package cn.tedu.music.admin.controller;

import cn.tedu.music.admin.pojo.vo.ListTopVO;
import cn.tedu.music.admin.pojo.vo.PlayListVO;
import cn.tedu.music.admin.service.impl.PlayListServiceImpl;
import cn.tedu.stx_common.web.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/base/playlist")
public class PlayListController {
    @Autowired
    PlayListServiceImpl playListService;
    @GetMapping("/get")
    public JsonResult getPlayList(){
        List<PlayListVO> list = playListService.getPlayList();
        return JsonResult.ok(list);
    }
    @GetMapping("/listop/get")
    public JsonResult getListTop(){
        ListTopVO listTopVO = playListService.getListTop();
        return JsonResult.ok(listTopVO);
    }

}
